<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <jsp:include page="/inc/head.jsp"/>
    <title>用户管理</title>
</head>
<body>
<jsp:include page="/inc/top.jsp"/>
<div class="container">
    <jsp:include page="inc.jsp"/>
    <table class="table table-bordered table-striped table-hover">
        <thead>
        <tr>
            <td>用户id</td>
            <td>用户名</td>
            <td>用户昵称</td>
            <td>用户密码</td>
            <td>操作</td>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${users}" var="user">
            <tr>
                <td>${user.id}</td>
                <td>${user.username}</td>
                <td>${user.nickname}</td>
                <td>
                    ${user.password}
                </td>
                <td>
                    <a href="javascript:confirmOp('<%=request.getContextPath()%>/admin/user?m=delete&id=${user.id}','删除用户对象不可逆，确定删除${user.username}吗?')" class="btn btn-danger">删除</a>
                    <a href="<%=request.getContextPath()%>/admin/user?m=update&id=${user.id}" class="btn btn-warning">更新</a>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
</div>
</body>
</html>
